package com.ccsu.eb.config;

import java.io.FileWriter;
import java.io.IOException;

/**
 * @Description: 用一句话描述
 * @Auther: 新梦想*陈超
 * @Date: 2022/3/22 20:43
 */
public class AlipayConfig {
    // 应用ID,您的APPID，收款账号既是您的APPID对应支付宝账号
    public static String app_id = "2021000119617322";


    // 商户私钥，您的PKCS8格式RSA2私钥
    public static String merchant_private_key = "MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCBHc7GJQx7N92OHxbB4x1eTSZfZriKlWTdAyHOjOi9tRtoxQ3Z8QJ0lsBpJ9/tKs6PUZF/0Q0LGt2e24WtoJgMCmtOm20FLtzwEsfsM4e7/Uz0aIQP8f08zGnIAy2bUTwpaOCxtUWN8QLav+go0eatkqPngKecilh7tp4ew6tDRDDkCaHsKtJDV+U/vmqdvmcEUFvraLlTP3qsAlA8H+xEeocR8znMNS2l1Q6ApSRLYAKF7BbtrfqWLgkhQg8kI6On/URlnQjPrbFXgnkcp7GjFDDci5Hd6HhsrRiqbvxOHYFgMd7YRARf2fusXCWOZ0vgSKs8K2oCaPTzoy2ELzB1AgMBAAECggEAP3c9alxPtEmTmAZkE03l47KciAxf7Y7dk120wmi1Bnr9TBSAaH51LIXlckrtYRDHk98OW/uQI8NC6JETNnNYCaMdd/giMIgGheNVbh8uOxOZPhIZyBS026vG20/knRHjNp+cwv1NgSXUt13Zaicy8mLAOk0dFm9Saw0q0AhyKI+rlMysgxPzCaseV4cpprzO2Fc7P4jNz33cB4njysY+peLhHH8o0d7PDdXBbEW/fwnV/YiDQ9dJwf8rjcHAVeNhrpQoLwA6I0jxwCNKkSt43hH2OF43lVWagEsOBG2VFm5Nn8fTV1E5QNfNlp8bbDF781v1DWND4G8c/9Wt+yCxiQKBgQC1/IkvxSjKqmkVfVcabKmwwTbPLIqWCrjAeiuBHt0XzFODlHy3z/O5dwsucCYMaDCuddOl7BAPAtMe3pGDjoW0xuTC2NoHwcEbOwQWJ2M+u84SQhqGNXvzA/ZfBqvUSCphGYwp2MQztH3yhpP1nD5fzJSO7qlE1mD7A0HsObBYZwKBgQC1oLma6/WJSwlanhs0bRuY5bUvLFfbaNtRROmFcRF8DTUWaJeiu+/Q/zZW/zHeG4iMKCN/QpoTvqRpQoEiMjQ6O09JHjOqY84gNAIThIRfgDZl+rTRE8bIZt+mJGjBuzDHABVmLAt8COraaqz6FnQxks5pUCDZiUWNlYKZ/MUWwwKBgA/FDWI9VHaTY72/+b9JcT7mz0gOlQfBcBcFvyVWNlRsmUQKpvAKrhUBMs/YWgOzN5y2ixuSpCWY2hCPus5KmF186q/TuLj5WjFw4L7GtPvnrEi6v6+njNEXI89CNbuUcU+utg2eQgo09sEAVmvvGRyWDr2AAtz7MrYtpxXAPf67AoGAWyJOf0GubjlMdD+o/uFQW6PHCeiCHQG8KkcdtWtKjqhB3wCUNX9/kaq9JWHfL8c4+LqbNRvCG+4oqPhJu1LdieqAmfuhiPmTT+1IrWps0U6P/ROS7uWxdJTJ25+hQLQggXm1QxMOoCoJTZcBPGtP2iADmiwuj3ilgalnYsTGT+kCgYAcWLcJMEtitUYPfRwdg3pa4Ebcj/XOU6y/hhk+3RmffkVVpzo18ncwAl+3P8KtZyNh1EREahetaMMWM0m97gZ1MjZk+bIK993BmaSjbW3W9a0tbCNOowp/hYqP6tt8XJbjxvxffBWHOyDANkJBMkBIAMW7qwZeSmWT427SvFtJdQ==";

    // 支付宝公钥,查看地址：https://openhome.alipay.com/platform/keyManage.htm 对应APPID下的支付宝公钥。
    public static String alipay_public_key = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAhL1OzbNktQX9F0pvlGF0rnK64cGLXQ6tvTgxP178TXnXQGUBebtZCwLClK53Q81CeLI7gTw3iKTvbkMEPWXxOZDznG/ZeKyb+7ec7xvcRVOc4zCaz3HNYV1JDnKlTdkMGsKdU07j+RpypGupJ5KQ+sxIlmZcYPhhssL1uwoN/mApjbtUQZBe6kOBCa/u6J4nTaEo0D7s3SBWZKnX+Cfj+/yjbwLszqQ7frKanOV5fR4xwxhpMU6bFeXJH9CjL8psBFLOn5WzDN6hJfLuo3q9LcELlShTlX/Diw0ffozXuKSpdGV2Eyz23a2q1sn+GqEKXcQp2Jk7k2SwEUlsNAc3KQIDAQAB";

    // 服务器异步通知页面路径  需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
    public static String notify_url = "http://dj3mr5.natappfree.cc/car/notify_url";

    // 页面跳转同步通知页面路径 需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
    public static String return_url = "http://dj3mr5.natappfree.cc/car/return_url";
    //  public static String return_url = "http://5ysqf6.natappfree.cc/alipay/return_url.jsp";

    // 签名方式
    public static String sign_type = "RSA2";

    // 字符编码格式
    public static String charset = "utf-8";

    // 支付宝网关
    public static String gatewayUrl = "https://openapi.alipaydev.com/gateway.do";

    // 支付宝网关
    public static String log_path = "/Users/mr.chan/Documents/alipay_log";


    //↑↑↑↑↑↑↑↑↑↑请在这里配置您的基本信息↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑

    /**
     * 写日志，方便测试（看网站需求，也可以改成把记录存入数据库）
     * @param sWord 要写入日志里的文本内容
     */
    public static void logResult(String sWord) {
        FileWriter writer = null;
        try {
            writer = new FileWriter(log_path + "alipay_log_" + System.currentTimeMillis()+".txt");
            writer.write(sWord);
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            if (writer != null) {
                try {
                    writer.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
    }
}

